Skip to content

docs: query cost limits for API tokens and roles - #695

Open
benenharrington wants to merge 4 commits into
mainfrom
docs/query-spend-limits
Open

docs: query cost limits for API tokens and roles#695
benenharrington wants to merge 4 commits into
mainfrom
docs/query-spend-limits

Conversation

@benenharrington

@benenharrington benenharrington commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Overview

Documents the new query cost limits feature: hourly and daily caps, in dollars, on the query costs of API tokens and roles.

Naming: the docs say “query cost limits”, matching the console UI labels in ctrl#8375 (“Query cost limits”, “Query cost limit reached”). “Spend limit” was avoided because it collides with the org-wide monthly spending limit in billing, and bare “query limit” collides with the plan’s monthly query allowance. The new page and the usage-billing page now disambiguate each other explicitly.

The canonical page is deliberately located in the AI agents group (/console/intelligence/query-cost-limits, sidebar: Query cost limits) rather than in settings reference. The customer this feature is for is the heavy MCP/agent user, and the pitch the page leads with is theirs: give an agent a capped token and you know your worst-case query bill in advance, so you can let it run loose. Reference readers still find it through cross-links.

Changes

  • New page console/intelligence/query-cost-limits.mdx — agent-first framing, then the mechanics: what counts as query cost (billed query GB-hours), fixed UTC hourly/daily windows, $0 blocks all queries, 429 + Retry-After on trip, token vs role limits (role limits cover console, PATs, and OAuth sessions such as remote MCP; strictest limit across roles wins), usage meters, and what happens at/after the limit.
  • Cross-links: AI agents overview (token-hygiene list + remote-MCP note), MCP server page (new “Limit query costs” section: token limits for local setup, role limits for remote OAuth), tokens reference (new “Limit query costs of an API token” subsection), optimize-usage (new “Cap query costs per token or role” pointer), usage-billing (spending-limit section points to per-token/member limits).
  • Nav: added to the AI agents group in docs.json between MCP server and Agent-created orgs.

Claims are sourced from the merged backend work (axiom repo: token-limits and add-user-limits series, pkg/edge/clients/limiter, pkg/core/common/querylimits) and the console PR (ctrl#8375): UTC clock-aligned windows, cents wire format/dollar UI, Axiom Cloud + Enterprise gate, per-scope 429s, and the “Query cost limits” / “Query usage” UI labels.

Draft until

  • ctrl#8375 (console UI) merges and the fe-query-cost-limits-2026-07 flag is enabled — UI steps reference surfaces that aren’t live yet.

Testing

  • pnpm audit:content: no unresolved links, floors pass.
  • pnpm build: clean.

🤖 Generated with Claude Code

New page under AI agents documenting hourly/daily query spend limits,
framed around giving AI agents a bounded query budget. Cross-linked from
the AI agents overview, MCP server, tokens, and optimize-usage pages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 1:41pm

Request Review

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📝 Vale prose report

🟡 1 warning

Location Rule Message
🟡 content/docs/(documentation)/console/intelligence/query-cost-limits.mdx:72 Google.OxfordComma Use the Oxford comma in 'To unblock an identity before the window resets, raise or'.

Advisory only — this check never blocks the PR.

ℹ️ How to read this & when it's fine to ignore

This is advisory prose linting (Vale with the Google developer style guide). It is guidance, not a gate — nothing here blocks the merge.

Fix the suggestions that improve the writing (contractions, first-person "we", terminology). It's expected that some won't make sense — ignore those. Vale reads Markdown as prose, so it sometimes flags code, identifiers, product/UI names, or example data that only look like prose. Those are false positives; leaving them is the right call.

To silence a false positive at the source:

  • Wrap code-like text (identifiers, values, query fragments, durations) in `backticks` so Vale treats it as code.
  • Wrap a whole region — e.g. an example or data table — between {/* vale off */} and {/* vale on */}.

If a rule is consistently wrong for our docs, propose disabling it in .vale.ini rather than working around it each time.

'Spend limit' collides with the org-wide monthly spending limit in
billing. 'Query cost limits' matches the console UI label and avoids
both that collision and the plan-allowance 'query limit'. Adds
disambiguation notes in both directions (new page <-> usage-billing).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@benenharrington benenharrington changed the title docs: query spend limits for API tokens and roles docs: query cost limits for API tokens and roles Jul 30, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
keywords: ["ai agents", "query cost limits", "budget", "mcp", "api tokens", "roles", "query usage", "429"]
---

AI agents are heavy query users. An agent investigating an incident or exploring a dataset can run hundreds of queries in minutes, and unlike a human, it doesn’t pause to consider what the session costs. Query cost limits put a hard cap on that risk: you give a token or a role an hourly and a daily query budget in dollars, and Axiom blocks further queries for that identity when the budget is spent. The block lifts automatically when the window resets.

@dominicchapman dominicchapman Aug 3, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this is in draft so forgive the early comment - noticed when linking gtm a preview for question from customer.

Just a thought... Let's not instil fear with "are heavy query users" and "it doesn’t pause to consider what the session costs".

"can be..." and "might not always be so thoughtful about..." etc can soften

…agents

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants